<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        /*子孙后代选择器*/
     /*   body div div p{
            color: red;
        }*/
        /*子元素选择器*/
        body>div>p{
            color: red;
        }
        a:link{color: red}
        a:visited{color: green}
        a:hover{color: yellow}
        a:active{color: blue}
    </style>
</head>
<body>
<a href="http://tmooc.cn">超链接1</a>
<a href="http://baidu.com">超链接2</a>
<a href="http://youku.com">超链接3</a>
<p>p1</p>
<div>
    <p>p2</p>
    <div><p>p3</p></div>
    <div>
        <p>p4</p>
        <div><p>p5</p></div>
    </div>
</div>
</body>
</html>